<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>CellFormatPart (POI API Documentation)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="CellFormatPart (POI API Documentation)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/CellFormatPart.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/poi/ss/format/CellFormatCondition.html" title="class in org.apache.poi.ss.format"><span class="strong">PREV CLASS</span></a></li>
<li><a href="../../../../../org/apache/poi/ss/format/CellFormatResult.html" title="class in org.apache.poi.ss.format"><span class="strong">NEXT CLASS</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/poi/ss/format/CellFormatPart.html" target="_top">FRAMES</a></li>
<li><a href="CellFormatPart.html" target="_top">NO FRAMES</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>SUMMARY:&nbsp;</li>
<li>NESTED&nbsp;|&nbsp;</li>
<li><a href="#field_summary">FIELD</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">CONSTR</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">METHOD</a></li>
</ul>
<ul class="subNavList">
<li>DETAIL:&nbsp;</li>
<li><a href="#field_detail">FIELD</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">CONSTR</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">METHOD</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<p class="subTitle">org.apache.poi.ss.format</p>
<h2 title="Class CellFormatPart" class="title">Class CellFormatPart</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.poi.ss.format.CellFormatPart</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <strong>CellFormatPart</strong>
extends java.lang.Object</pre>
<div class="block">Objects of this class represent a single part of a cell format expression.
 Each cell can have up to four of these for positive, zero, negative, and text
 values.
 <p/>
 Each format part can contain a color, a condition, and will always contain a
 format specification.  For example <tt>"[Red][>=10]#"</tt> has a color
 (<tt>[Red]</tt>), a condition (<tt>>=10</tt>) and a format specification
 (<tt>#</tt>).
 <p/>
 This class also contains patterns for matching the subparts of format
 specification.  These are used internally, but are made public in case other
 code has use for them.</div>
<dl><dt><span class="strong">Author:</span></dt>
  <dd>Ken Arnold, Industrious Media LLC</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#COLOR_GROUP">COLOR_GROUP</a></strong></code>
<div class="block">Within <a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#FORMAT_PAT"><code>FORMAT_PAT</code></a>, the group number for the matched color.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.util.regex.Pattern</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#COLOR_PAT">COLOR_PAT</a></strong></code>
<div class="block">Pattern for the color part of a cell format part.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#CONDITION_OPERATOR_GROUP">CONDITION_OPERATOR_GROUP</a></strong></code>
<div class="block">Within <a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#FORMAT_PAT"><code>FORMAT_PAT</code></a>, the group number for the operator in the
 condition.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.util.regex.Pattern</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#CONDITION_PAT">CONDITION_PAT</a></strong></code>
<div class="block">Pattern for the condition part of a cell format part.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#CONDITION_VALUE_GROUP">CONDITION_VALUE_GROUP</a></strong></code>
<div class="block">Within <a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#FORMAT_PAT"><code>FORMAT_PAT</code></a>, the group number for the value in the
 condition.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.util.regex.Pattern</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#FORMAT_PAT">FORMAT_PAT</a></strong></code>
<div class="block">Pattern for an entire cell single part.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#SPECIFICATION_GROUP">SPECIFICATION_GROUP</a></strong></code>
<div class="block">Within <a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#FORMAT_PAT"><code>FORMAT_PAT</code></a>, the group number for the format
 specification.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.util.regex.Pattern</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#SPECIFICATION_PAT">SPECIFICATION_PAT</a></strong></code>
<div class="block">Pattern for the format specification part of a cell format part.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#CellFormatPart(java.lang.String)">CellFormatPart</a></strong>(java.lang.String&nbsp;desc)</code>
<div class="block">Create an object to represent a format part.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#applies(java.lang.Object)">applies</a></strong>(java.lang.Object&nbsp;valueObject)</code>
<div class="block">Returns <tt>true</tt> if this format part applies to the given value.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/poi/ss/format/CellFormatResult.html" title="class in org.apache.poi.ss.format">CellFormatResult</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#apply(javax.swing.JLabel, java.lang.Object)">apply</a></strong>(javax.swing.JLabel&nbsp;label,
     java.lang.Object&nbsp;value)</code>
<div class="block">Apply this format part to the given value, applying the result to the
 given label.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/poi/ss/format/CellFormatResult.html" title="class in org.apache.poi.ss.format">CellFormatResult</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#apply(java.lang.Object)">apply</a></strong>(java.lang.Object&nbsp;value)</code>
<div class="block">Apply this format part to the given value.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#group(java.util.regex.Matcher, int)">group</a></strong>(java.util.regex.Matcher&nbsp;m,
     int&nbsp;g)</code>
<div class="block">Returns the string from the group, or <tt>""</tt> if the group is
 <tt>null</tt>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.StringBuffer</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#parseFormat(java.lang.String, org.apache.poi.ss.format.CellFormatType, org.apache.poi.ss.format.CellFormatPart.PartHandler)">parseFormat</a></strong>(java.lang.String&nbsp;fdesc,
           <a href="../../../../../org/apache/poi/ss/format/CellFormatType.html" title="enum in org.apache.poi.ss.format">CellFormatType</a>&nbsp;type,
           org.apache.poi.ss.format.CellFormatPart.PartHandler&nbsp;partHandler)</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a name="COLOR_PAT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>COLOR_PAT</h4>
<pre>public static final&nbsp;java.util.regex.Pattern COLOR_PAT</pre>
<div class="block">Pattern for the color part of a cell format part.</div>
</li>
</ul>
<a name="CONDITION_PAT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CONDITION_PAT</h4>
<pre>public static final&nbsp;java.util.regex.Pattern CONDITION_PAT</pre>
<div class="block">Pattern for the condition part of a cell format part.</div>
</li>
</ul>
<a name="SPECIFICATION_PAT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SPECIFICATION_PAT</h4>
<pre>public static final&nbsp;java.util.regex.Pattern SPECIFICATION_PAT</pre>
<div class="block">Pattern for the format specification part of a cell format part.</div>
</li>
</ul>
<a name="FORMAT_PAT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FORMAT_PAT</h4>
<pre>public static final&nbsp;java.util.regex.Pattern FORMAT_PAT</pre>
<div class="block">Pattern for an entire cell single part.</div>
</li>
</ul>
<a name="COLOR_GROUP">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>COLOR_GROUP</h4>
<pre>public static final&nbsp;int COLOR_GROUP</pre>
<div class="block">Within <a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#FORMAT_PAT"><code>FORMAT_PAT</code></a>, the group number for the matched color.</div>
</li>
</ul>
<a name="CONDITION_OPERATOR_GROUP">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CONDITION_OPERATOR_GROUP</h4>
<pre>public static final&nbsp;int CONDITION_OPERATOR_GROUP</pre>
<div class="block">Within <a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#FORMAT_PAT"><code>FORMAT_PAT</code></a>, the group number for the operator in the
 condition.</div>
</li>
</ul>
<a name="CONDITION_VALUE_GROUP">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CONDITION_VALUE_GROUP</h4>
<pre>public static final&nbsp;int CONDITION_VALUE_GROUP</pre>
<div class="block">Within <a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#FORMAT_PAT"><code>FORMAT_PAT</code></a>, the group number for the value in the
 condition.</div>
</li>
</ul>
<a name="SPECIFICATION_GROUP">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>SPECIFICATION_GROUP</h4>
<pre>public static final&nbsp;int SPECIFICATION_GROUP</pre>
<div class="block">Within <a href="../../../../../org/apache/poi/ss/format/CellFormatPart.html#FORMAT_PAT"><code>FORMAT_PAT</code></a>, the group number for the format
 specification.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="CellFormatPart(java.lang.String)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>CellFormatPart</h4>
<pre>public&nbsp;CellFormatPart(java.lang.String&nbsp;desc)</pre>
<div class="block">Create an object to represent a format part.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>desc</code> - The string to parse.</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="applies(java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>applies</h4>
<pre>public&nbsp;boolean&nbsp;applies(java.lang.Object&nbsp;valueObject)</pre>
<div class="block">Returns <tt>true</tt> if this format part applies to the given value. If
 the value is a number and this is part has a condition, returns
 <tt>true</tt> only if the number passes the condition.  Otherwise, this
 always return <tt>true</tt>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>valueObject</code> - The value to evaluate.</dd>
<dt><span class="strong">Returns:</span></dt><dd><tt>true</tt> if this format part applies to the given value.</dd></dl>
</li>
</ul>
<a name="apply(java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>apply</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/poi/ss/format/CellFormatResult.html" title="class in org.apache.poi.ss.format">CellFormatResult</a>&nbsp;apply(java.lang.Object&nbsp;value)</pre>
<div class="block">Apply this format part to the given value.  This returns a <a href="../../../../../org/apache/poi/ss/format/CellFormatResult.html" title="class in org.apache.poi.ss.format"><code>CellFormatResult</code></a> object with the results.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - The value to apply this format part to.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A <a href="../../../../../org/apache/poi/ss/format/CellFormatResult.html" title="class in org.apache.poi.ss.format"><code>CellFormatResult</code></a> object containing the results of
         applying the format to the value.</dd></dl>
</li>
</ul>
<a name="apply(javax.swing.JLabel, java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>apply</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/poi/ss/format/CellFormatResult.html" title="class in org.apache.poi.ss.format">CellFormatResult</a>&nbsp;apply(javax.swing.JLabel&nbsp;label,
                     java.lang.Object&nbsp;value)</pre>
<div class="block">Apply this format part to the given value, applying the result to the
 given label.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>label</code> - The label</dd><dd><code>value</code> - The value to apply this format part to.</dd>
<dt><span class="strong">Returns:</span></dt><dd><tt>true</tt> if the</dd></dl>
</li>
</ul>
<a name="parseFormat(java.lang.String, org.apache.poi.ss.format.CellFormatType, org.apache.poi.ss.format.CellFormatPart.PartHandler)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseFormat</h4>
<pre>public static&nbsp;java.lang.StringBuffer&nbsp;parseFormat(java.lang.String&nbsp;fdesc,
                                 <a href="../../../../../org/apache/poi/ss/format/CellFormatType.html" title="enum in org.apache.poi.ss.format">CellFormatType</a>&nbsp;type,
                                 org.apache.poi.ss.format.CellFormatPart.PartHandler&nbsp;partHandler)</pre>
</li>
</ul>
<a name="group(java.util.regex.Matcher, int)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>group</h4>
<pre>public static&nbsp;java.lang.String&nbsp;group(java.util.regex.Matcher&nbsp;m,
                     int&nbsp;g)</pre>
<div class="block">Returns the string from the group, or <tt>""</tt> if the group is
 <tt>null</tt>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>m</code> - The matcher.</dd><dd><code>g</code> - The group number.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The group or <tt>""</tt>.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/CellFormatPart.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/poi/ss/format/CellFormatCondition.html" title="class in org.apache.poi.ss.format"><span class="strong">PREV CLASS</span></a></li>
<li><a href="../../../../../org/apache/poi/ss/format/CellFormatResult.html" title="class in org.apache.poi.ss.format"><span class="strong">NEXT CLASS</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/poi/ss/format/CellFormatPart.html" target="_top">FRAMES</a></li>
<li><a href="CellFormatPart.html" target="_top">NO FRAMES</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>SUMMARY:&nbsp;</li>
<li>NESTED&nbsp;|&nbsp;</li>
<li><a href="#field_summary">FIELD</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">CONSTR</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">METHOD</a></li>
</ul>
<ul class="subNavList">
<li>DETAIL:&nbsp;</li>
<li><a href="#field_detail">FIELD</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">CONSTR</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">METHOD</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>
                <i>Copyright 2014 The Apache Software Foundation or
        its licensors, as applicable.</i>
            </small></p>
</body>
</html>
